package org.grow.cooldown.CookModule.entity;

import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Document
public class Dish {

    private String dishname;

    private Material majorM;

    private List<DishM> supplementaryM;
    //描述这道菜的标签 如非常甜 适合养生 等

    private List<String> labels;

    private Integer costSeconds;
    @Indexed
    private LocalDateTime disCreateT;


    public static class CookException extends RuntimeException{
        private int code;

        public CookException(int code,String message) {
            super(message);
            this.code = code;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }
    }
}
